package day1106_1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class D1 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("D:\\a.txt");//1.创建FileInputStream对象   fis

        //int data=fis.read(); //2.fis的read (1bit) (汉字2bit)

        byte[]  data2=new byte[1024];
        int len=0;
        while(   (len=fis.read(data2))  !=-1  ){
            System.out.println( new String(data2) );
        }

        fis.close();//3.fis.close()
    }

}
